/**************************************************************
 *
 * Copyright (c) 2008, ******, All Rights Reserved.
 *
 * 名 称:
 *		test.cpp
 * 位 置:
 *		src/pub/test.cpp
 * 描 述:
 *		公用测试类
 * 备 注:
 *		无
 * 修 改:
 *		2008-09-20  Simon   - 创建
 *
 **************************************************************/

extern "C"
{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
}
#include <string>
#include <iostream>
#include "occi.h"
#include "pub/def.h"
#include "pub/db.h"
#include "pub/err.h"
#include "pub/log.h"
#include "pub/test.h"

using namespace std;
using namespace oracle::occi;

//构造函数
Test::Test()
{
	char logFile[256] = { 0 };
	sprintf(logFile, "%s/xfsale4c/log/test.log", getenv("HOME"));
	Log::setLogLevel(LOGLVL_DEBUG);
	Log::setLogTo(LOGTO_FILE);
	Log::setLogFile(logFile);
}

//析构函数
Test::~Test()
{

}

//构造函数
TestDB::TestDB()
{
	pool = ConnectionPoolWrapper::getInstance();
	conn = pool->createConnection();
}

//析构函数
TestDB::~TestDB()
{
	pool->terminateConnection(conn);
	ConnectionPoolWrapper::freeInstance();
}
